package cn.bs.busuo.account.controller;

import cn.bs.busuo.account.pojo.param.Order;
import cn.bs.busuo.account.service.IOrderService;
import cn.bs.busuo.common.web.JsonResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "6.买票")
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private IOrderService orderService;

    @ApiOperation("创建订单")
    @ApiOperationSupport(order = 100)
    @PostMapping("/addOrder")
    public JsonResult addOrder(Order order) {
        orderService.addOrder(order);
        return JsonResult.ok();
    }
}
